import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'package:industry_net/base/common/util.dart';
import 'package:industry_net/base/component/component.dart';
import 'package:industry_net/base/component/list/table_view.dart';
import 'controller.dart';

class AppManPage extends GetView<AppManController> {
  const AppManPage({Key? key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: detailAppBar(context,
          leadding: TextButton(
              onPressed: Get.back,
              child: Text(
                '取消',
                style:
                    TextStyle(color: const Color(0xff576c88), fontSize: font14),
              )),
          actions: [
            InkWell(
                child: Column(
              mainAxisAlignment: MainAxisAlignment.center,
              children: [
                InkWell(
                  onTap: controller.actionSave,
                  child: Container(
                    margin: EdgeInsets.only(right: gap12),
                    width: 45.r,
                    height: 23.r,
                    alignment: Alignment.center,
                    decoration: BoxDecoration(
                        color: ColorsUtil.green,
                        borderRadius: BorderRadius.circular(2.r)),
                    child: Text(
                      '保存',
                      style: pfMediumStyle(
                          color: ColorsUtil.white, fontSize: font14),
                    ),
                  ),
                ),
              ],
            ))
          ]),
      body: Obx(() => TableView(data: controller.state.dataSource.value)),
    );
  }
}
